<template>
	<view>
		<image
		:src="require(`@/static/image/common/back${ color && ('_' + color) || '' }.png`)"
		:style="{ width: width + 'rpx', height: '42rpx' }"
		mode="widthFix"
		@click="backAction"></image>
	</view>
</template>

<script>
	export default {
		props: {
			width: {
				type: [Number],
				default: 24
			},
			color: {
				type: String,
				default: ''
			},
			slotClick: {
				type: Boolean,
				default: false
			}
		},
		data() {
			return {
				
			}
		},
		methods: {
			backAction() {
				if (this.slotClick) {
					this.$emit('click')
				} else {
					uni.navigateBack({ delta: 1 })
				}
			}
		}
	}
</script>

<style>
</style>
